-------------------------------------------------------------- 

Auto Repair and Auto Recharge Ring v2.70 

-------------------------------------------------------------- 

This mod adds automatic repair/recharge ring and repair/recharge spell.

=============================
REQUIREMENTS
=============================
Oblivion Script Extender v0020 
http://obse.silverlock.org/ 

=============================
INSTALLATION
=============================
1.Copy the esp file to "Data" folder in the installation folder of Oblivion. 
2.Activate the esp.

*If you will use Ini file, edit the Ini file included, save it in the "...\Oblivion\Data\Ini" folder.

=============================
UPDATE / VERSION UP
=============================
Please execute "Initialization of the AAR" of the options.
When the initialization is complete, the message "AAR :  Initialized" will be displayed.
(Configured options will return to the default values.)

=============================
UNINSTALLATION
=============================
Please remove "Auto Repair and Auto Recharge Ring.esp".

*If you're using Ini file, remove "...\Oblivion\Data\Ini\Auto Repair and Auto Recharge Ring.ini".

=============================
LOCATION
=============================
Mystic Emporium in the IC Market District.

=============================
HOW TO USE
=============================
"AAR : Auto Repair Ring (MiscItem)"
Purchase the ring at the "Mystic Emporium", give a repair hammer and the ring to the companion.
Repair process is started at regular intervals, equipment with a health points of less than "Lower limit of repair" is repaired.
From v2.14, changed to run when the companion is in the same cell & near the player.
 
"AAR : Auto Recharge Ring(MiscItem)"
Purchase the ring at the "Mystic Emporium", give a soul gem and the ring to the companion. 
Recharge process is started at regular intervals, weapons with a charge of less than "Lower limit of recharge" is recharged.
From v2.14, changed to run when the companion is in the same cell & near the player.

Spell "AAR: Repair", Spell "AAR: Recharge"
Purchase a crystal ball named "AAR : Controller" at the "Mystic Emporium".
2 touch spells will be added.(These spells will removed by removing "AAR : Controller" from your inventory.)
 
Spell "AAR: Repair"
Give a repair hammer to the companion, use the spell to the companion.
Equipment with a health points of less than "Lower limit of repair" is repaired.
 
Spell "AAR: Recharge"
Give a soul gem to the companion, use the spell to the companion.
Weapons with a charge of less than "Lower limit of recharge" is recharged.

[Others]
-If the ring owner/the spell target has armourer Lv75 or higher skills, they can repair the equipment up to 125% health points.
-If the ring owner/the spell target is in combat, the repair/recharge isn't run.
-The player gets the experience of the armorer skill, when "Require a repair hammer" of the option is ON & "Growth of the player's armorer skill" of the option is ON.
-You can change the options using "AAR controller". 

=============================
OPTIONS
=============================
Click "AAR Controller" and close your inventory, you will be able to change the options.
(Return to the default value when you set a value outside the range)
 
*Shift key + "Back" button click
 Close options menu(Same behavior as "Quit" button)

----------------------------
Repair options
----------------------------
"Interval of auto repair"
Interval of auto repair.(in seconds)
The default value is 60.
 
*Available Shift key + click (5x) & Ctrl key + click (2x) to change the value.
(if you click "+30" button while holding down the Ctrl key. the option value will be plus 60 seconds.)

"Lower limit of repair" 
This option is lower limit of the health points for equipment.(%)
(When armorer skill is more than Lv75, the percentage value is calculated from the health points of 125%.)
Equipment with a health points of less than this value will be repaired.
The default value is 70.

*Available Shift key + click (5x) & Ctrl key + click (2x) to change the value.

"Require a repair hammer"
If ON, repair process requires a repair hammer. A repair hammer may break.(depend on armourer skill and luck)
Requires at least 1 repair hammer, regardless whether or not a repair hammer will break.
The default value is ON.

"Skill limitation of enchanted equipment"
If ON, repair of enchanted equipment requires armourer Lv50 skills.
The default value is ON.

"Repair more than one equipment at once"
If ON, all equipment with a health point of less than "Lower limit of repair" is repaired at once.
If OFF, equipment is repaired one by one place. (The repair order, please configure in "Slot order of repair".)
The default value is OFF.
 
"Repair up to the max health points at once"
If ON, equipment is repaired up to the maximum health points at once.
If OFF, Repairs is performed depend on armourer skill.
The default value is OFF.

"Slot order of repair"
This option is the slot order of the equipment to be repaired. Choose ascending or descending order.
The default value is ascending order.
(If you have setting "Repair more than one equipment at once" to OFF and want to repair weapons before armor, Descending order might be good.)

----------------------------
Repair Options(Inventory)
----------------------------
"Repair equipment in inventory"
If ON, weapons and armor in inventory will be repaired one by one when the weapons and armor that are now equipped weren't repaired(When they have already finished or were skipped by skill limitation etc).
The default value is OFF.

"Repair priority of equipment in inventory"
This option is the repair priority(order) of equipment in inventory. Select from the following three.
The default value is 1.

1) Not specify
  It will be repaired from equipment that was found first.(fastest)
  Please select this setting if you want to use in the same behavior as v2.6x.
	
2) Equipment with a minimum health(%)
	It will be repaired from equipment with a minimum health.

3) Equipment with a maximum health(%)
	It will be repaired from equipment with a maximum health.
	
----------------------------
Repair Hammer Options
----------------------------
"Processing of repair hammer"
If you do a repair on the same balance as the previous version, choose "processing1".
If you do a repair on the new process that is added in v2.30, choose "processing2".
(Processing2 has slightly lower possibility to break a repair hammer.)
The default value is "processing2".

"Auto distribution of repair hammer"
This option is whether or not to give repair hammers to companions from the player when companions doesn't have a repair hammer at the start of auto repair.
The default value is OFF.
From v2.50, divided "Number of auto distribution of repair hammer" and "Auto distribution of repair hammer".

"Number of auto distribution of repair hammer"
This option is the number of repair hammers that is given to companions from the player automatically.
If the number of repair hammer that companions has is zero at the start of auto repair, the player will automatically give repair hammer according to this option.
If the player has repair hammers greater than this option, auto distribution of repair hammer is performed.
(For example, if the number of auto distribution is 5, and the player has 5 repair hammers, auto distribution will not be performed. In this case, the player need to have six or more repair hammers. )
The default value is 1.

*Available Shift key + click (5x) & Ctrl key + click (2x) to change the value.

----------------------------
Recharge options
----------------------------
"Interval of auto recharge"
Interval of auto recharge.(in seconds)
The default value is 120.

*Available Shift key + click (5x) & Ctrl key + click (2x) to change the value.

"Lower limit of recharge" 
This option is the lower limit of the charge for weapons.(%)
Weapons with a charge of less than this value will be recharged.
The default value is 20.

*Available Shift key + click (5x) & Ctrl key + click (2x) to change the value.

"Require a soul gem"
If ON, recharge process requires a soul gem/Azura's star.
If OFF, recharge process doesn't require a soul gem, and weapon is recharged up to the maximum charge at once.
The default value is ON.

Soul gem that can be used in auto recharge are as follows.(Petty, Lesser, Common, Greater, Grand, BlackSoulGem, Azura's star)

----------------------------
Recharge Options(Inventory)
----------------------------
"Recharge equipment in inventory"
If ON, weapons and armor in inventory will be recharged one by one when the weapons and armor that are now equipped weren't recharged(have already finished).
The default value is OFF.

"Recharge priority of equipment in inventory"
This option is the recharge priority(order) of equipment in inventory. Select from the following three.
The default value is 1.

1) Not specify
  It will be recharged from equipment that was found first.(fastest)
  Please select this setting if you want to use in the same behavior as v2.6x.
	
2) Equipment with a minimum charge(%)
	It will be recharged from equipment with a charge of minimum amount.

3) Equipment with a maximum charge(%)
	It will be recharged from equipment with a charge of maximum amount.

----------------------------
Soul Gem Options
----------------------------
"Usage order of soul gem"
This option is usage order(priority) of soul gem. Select from the following three.
The default value is 2.

1) Not specify
  It will be used from a soul gem that was found first.(fastest)

2) Soul gem with a charge close to full charge
  It will be used from a soul gem with a charge close to the charge required to full charge.
	
  e.g.) If the player/companion has a "Petty Soul Gem(150)" and a "Common Soul Gem(800)".
  If max charge of weapon is 3200, and current charge of weapon is 2000.
  The order of use is:
  1.Common Soul Gem
  2.Petty Soul Gem
 
  If max charge of weapon is 3200, and current charge of weapon is 3000.
  The order of use is:
  1.Petty Soul Gem
  2.Common Soul Gem
 
  If max charge of weapon is 3200, and current charge of weapon is 2600.
  The order of use is:
  1.Common Soul Gem
  2.Petty Soul Gem

3) Soul gem with a minimum charge
  It will be used from a soul gem with a charge of minimum amount.
	
  If the player/companion has a "Petty Soul Gem(150)" & a "Lesser Soul Gem(300)" & a "Common Soul Gem(800)".
  The order of use is:
  1.Petty Soul Gem
  2.Lesser Soul Gem
  3.Common Soul Gem
	
4) Soul gem with a maximum charge
  It will be used from a soul gem with a charge of maximum amount.
	
  If the player/companion has a "Petty Soul Gem(150)" & a "Lesser Soul Gem(300)" & a "Common Soul Gem(800)".
  The order of use is:
  1.Common Soul Gem
  2.Lesser Soul Gem
  3.Petty Soul Gem
	
"Auto distribution of soul gem"
This option is whether or not to give a soul gem to companions from the player when companions doesn't have a soul gem at the start of auto recharge.
If the player has 2 or more soul gems that are charged(except Azura's Star), the player give a soul gem to companions.
The default value is OFF.

Soul gem that can be used in auto distribution are as follows.(Petty, Lesser, Common, Greater, Grand, BlackSoulGem)

"Auto distribution priority of soul gem"
This option is the order of soul gems that are distributed automatically. select from the following two.
The default value is 2.

1) Not specify
  It will be distributed from a soul gem that was found first.(fastest)

2) Soul gem with a minimum charge
  It will be distributed from a soul gem with a charge of minimum amount that player has.
	
3) Soul gem with a maximum charge
  It will be distributed from a soul gem with a charge of maximum amount that player has.
	
----------------------------
Other options
----------------------------
"Auto repair/recharge of the player"
If ON, the player will repair/recharge the equipment automatically, when the player has the ring.
The default value is OFF.

"Growth of the player's armorer skill"
If ON, the player gets the experience of armorer skill in the auto repair.
(In addition to this option, need to set "Require a repair hammer" to "ON".)
The default value is OFF.

"Display messages"
If ON, Display a message at the end of the repair/recharge or auto distribution.
The default value is ON.
 
"Play sound effects"
If ON, play sound effects at the time of the repair/recharge or auto distribution.
The default value is OFF.

"Load Ini file"
It loads ini file, "...\Oblivion\Data\Ini\Auto Repair and Auto Recharge Ring.ini".
If you use ini file, edit the Ini file included, save it in the "...\Oblivion\Data\Ini" folder.
(If an out-of-range value is set when loaded it, the option is returned to the default value.)

"Initialization of the AAR"
It executes initialization of this MOD.
Please execute at the time of the update or when you want to return options to the default values.

=============================
CREDIT
=============================
Thanks to Bethesda soft works for The Elder Scrolls IV Oblivion

Thanks to OBSE development team for Oblivion Script Extender
http://obse.silverlock.org/

Thanks to shademe for Construction Set Extender
http://oblivion.nexusmods.com/mods/36370

=============================
PERMISSION
=============================
You can use this mod as you wish, only credit.

=============================
HISTORY
=============================
v2.70
- Added option "Repair priority of equipment in the inventory".
- Added option "Recharge priority of equipment in the inventory".
- Added to options menu, "Load ini file".
- Added choices to "Priority of auto distribution of Soul Gem" and "Usage order of soul gem".
- Added key operation(Shift + "Back" button click)
- Changed to display the current value of interval setting and seconds setting on the options menu.

v2.61
- Fixed a bug : When the "Repair more than one equipment at once" is ON,  the repair had been treated as an error in the final process even when it is successful.(v2.60 bug fix)
- Fixed a bug : When the "Require a soul gem" is OFF,  the recharge had been treated as an error in the final process even when it is successful.(v2.60 bug fix)

v2.60
- Added option to repair/recharge equipment in inventory.
- Fixed repair script.
- Fixed recharge script.

v2.50
- Added option to automatically distribute a soul gem. 
- Fixed the processing of auto distribution & changed the message.
- Fixed the processing of end messages & changed the message.(Changed to display the name of the equipment, if the equipment to be recharged / repaired is only one.)
- Came to be able to change the value using the CTRL key and the SHIFT key when you change the options to increase or decrease the value of seconds/interval.(Shift + Click 5x, Ctrl + Click 2x)
- Divided options, "Number of auto distribution of repair hammer" and " Auto distribution of repair hammer".
- Fixed repair script.
- Fixed recharge script.

v2.43
- Fixed a bug(v2.42 bug fix)(Repair process didn't stop even if equipment isn't repaired in the skill limitation).
- Removed unnecessary variables.

v2.42
- Fixed repair script.
- Fixed recharge script.
- Removed unnecessary processing.

v2.41
- Fixed repair script.
- Fixed recharge script.

v2.40
- Added option, "Automatic distribution of repair hammer".
- Fixed repair script.
- Fixed recharge script.
- Fixed option script.

v2.30
- Added to the option, "Slot order of repair".
- Added to the option, "Usage order of soul gem".
- Added a processing of repair hammer & added it to the option.
- Added a display of the remaining number of repair hammer at the end of the message, when a repair hammer was broken.
- Fixed a repair/recharge script.
- Fixed an option script.

v2.20
- Added to the options menu, "Growth of the player's armorer skill".
- Added to the options menu, "Display of the end message".
- Added to the options menu, "Initialization of the AAR".
- Changed so that the player gets the experience of the armorer skill when "Require a repair hammer" is ON and "Growth of the player's armorer skill" is ON.
- Added choice for increasing or decreasing value in percentage option and seconds option.
- Fixed a repair script.

v2.15
- Fixed a problem that the repairing process had stopped by skill limitation in the following case:
  "Repair more than one equipment at once" is OFF & "Skill limitation of enchanted equipment" is ON & When the player/companion with the armorer 1-49 skills repaired magical equipment of the smaller id slot, and equipment of remaining slots has the conditions of repair.
- Fixed so that the default message doesn't display when the hammer is broken on the player's auto repair.
- Fixed an option script.

v2.14
- Fixed a problem the spell wasn't added when you drop the "AAR controller" on the ground and picked it up again.
- Changed to run automatic repair/recharge when the companion is in the same cell & near the player.
- Fixed a repair/recharge script.

v2.13
- Fixed a process of removing soul gem.
- Fixed a recharge script.

v2.12
- Fixed a repair/recharge script(Commonization of the processing).

v2.11
- Fixed a recharge script.

v2.10
- Fixed a problem that the same kind of soul gem disappear multiple.
- Added a judgment of the soul gem to use for recharge. ( soul gem five basic, black soul gem, Azura's star )
- Fixed that if the container is the owner of the ring or the target of the spell, the process had not been skipped.
- Changed to display the charge of soul gem on the recharge end message.

v2.01
- Fixed a script.

v2.00
- Changed the kind of the item of the ring to miscitem.
- Changed to use a soul gem(Azura's star) to recharge. 
- Added an auto repair option of the player.
- Added a feature you can repair a equipment up to 125%, if more than armourer skill Lv75.
- Added an option of skill limitation of enchanted equipment.
- Added an option to repair more than one place in one run.
- Added an option to repair up to a maximum endurance at a time.
- Fixed a script.

v1.11
- Changed the recharge sound.
- Fixed a script.

v1.10
- Added a crystal ball "AAR Controller".
- Added a spell : "AAR : Recharge", "AAR : Repair".
- Added an option of whether or not to require a repair hammer to repair.

v1.00
- First edition

-------------------------

kldkld1
http://oblivion.nexusmods.com/users/3773083
http://www.4shared.com/folder/08dl35kz/oblivion_mod.html
